package com.usian.controller;

import com.usian.feign.PaperFeign;
import com.usian.pojo.B.day11.Paper;
import com.usian.r.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author BYBL
 * @date 2023/8/29
 */
@RestController
public class PaperController {
    @Autowired
    PaperFeign paperFeign;

    @RequestMapping("/paper/findAll")
    public R findAll(Paper paper){
        try {
            R all = paperFeign.findAll(paper);
            return R.success(all.getData());
        } catch (Exception e) {
            e.printStackTrace();
            return R.error();
        }
    }
}
